home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network CD 1
/
Network CD.iso
/
tbag
/
1-10
/
tb3
/
doc-files
/
utilities-doc
/
dirutil.doc
< prev
next >
Wrap
Text File
|
1985-11-25
|
13KB
|
233 lines
D I R U T I L I I I - a file/disk utility program
Original Version by Chris Nicotra
Revisions/Enhancements/Fixes by Dave Jobusch
More Revisions/Enhancements/Fixes by Nathan Barber
*********************************************************************
* READ the bottom of this file if you already know how to run the *
* other versions of this program! *
*********************************************************************
A feature that I really like is being able to get a screen
display of ASCII files from programs like "Sweep". The only
version of DirUtil that has ever had this lacked the numerous
gadget buttons of this version. Unfortunately, on that version,
the individual that added the TYPE feature, decided to keep the
code. It's a pity, he had a good implimentation. When I found this
version on a local board, there were only two things that I didn't like.
The lack of a TYPE was one. The other is that I have three floppies on my
Amiga, but the utility only had gadgets for df0: and df1:. Well, now it
supports df2:. When I compiled the code, I got over 50 compiler warnings,
I cleaned up over half of them and, hopefully, didn't add any new ones.
Don't worry about the warnings, the code compiles and links fine -- it's
just that I got tired of looking for errors in midst of the field of
warnings. It compiled fine with Lattice 3.03 and Manx 3.2
This program is in the public domain. That means you can't
sell the damn thing to anyone, and further more, I doubt
you'd get much for it. As a matter of fact, I beat this
thing to death for 2 weeks, and it still isn't perfect,
but it works. I got the original program from a BBS
in Omaha, and do not know who Chris Nicotra is.
Instructions:
Click on file or directory names in the file window to
select a file to take action on. Click on one of the
many gadgets to take the selected action on the selected
files/directory (yes, only one directory at a time).
The three string gadgets at the bottom are:
S: The current directory. Mess with this. If you
enter an existing path, you just selected the
new current directory.
D: The destination gadget. This one is used to enter
destination directories, and is also where you
enter requests for directories to create.
E: The string to be passed to any file you EXEC.
df0:,df1:,df2,ram:,hd0:,hd1:,hd2: --->
Set current directory to the root of the selected device.
ALL --->
Select ALL files in the current directory, including
the ones "scrolled off" the window.
CLEAR --->
De-select all selected files
COPY --->
Copy selected files to the directory specified in the
second string gadget. Mind you, you CANNOT enter a
filename here. It must be an existing directory
path and CAN go across devices. You should be able
to enter paths relative to the current directory.
(I think I fixed that...)
DELETE --->
Delete selected files. Will not delete directories.
RENAME --->
Renames first selected file or directory to the name
or path (on the same device) in the D string gadget.
GETDIR --->
If you want to go to a new directory, select
a directory in the file window, and click on this
gadget. DO NOT USE this to get a directory that is
listed in the first string gadget! If you must type
it in, you hit return while in the string gadget -
then that will be your new current directory.
MAKEDIR --->
This will create the directory that you have typed in
the second string gadget. You MAY use relative paths.
DELETEDIR --->
This will delete the non-empty diretory that you have
selected in the file window. You will get and error
if the directory is not empty.
PARENT --->
Go to the parent directory
ROOT --->
Go to the root of the current device
TYPE --->
Use this to view standard ASCII (readme, docs, etc) on
stdout; usually your CRT. Select the files you want to
view, then select the TYPE gadget. A new window, with
the window name being the file that you are currently
viewing, will open. Use the space bar to advance by one
screen, a <CR> will advance one line. Entering ESC will
advance you to the end of that file. The space bar will
then exit from that file. If you have selected to view
more than one file, the next will automatically be
displayed. After all selected files have been viewed,
the window will close, returning you to DirUtil's main
screen.
HTYPE --->
Types a file to the screen in HEX and ASCII 16 numbers
at a time.
SINFO --->
Used to show the number of USABLE bytes from the DEVICE
associated with the current directory (S).
DINFO --->
Used to show the number of USABLE bytes from the DEVICE
associated with the destination directory (D).
PRINT --->
Same as TYPE, but the output goes to PRT:
SWAP --->
Used to flip the S and D windows.
BYTE --->
Adds up the number of bytes of the selected files and
displays the sum and the number of files. Remember
that each file takes up 512 more bytes than indicated
because of its directory entry.
EXEC --->
"RUNS" the selected files from inside DIRUTIL. If DIRUTIL
was called from CLI, any output from the program is
directed to the calling CLI. Parameters may be passed
to the program by entering them in the E window.
MOVE --->
Same basic principle as RENAME, but assumes that you
want to just move the file to a new directory, not
actually rename it. It will move multiple files from
one directory to another. The D gadget should have
the destination path in it, NOT the whole filename
as with RENAME. MOVE will also move whole subdirectories
to another subdirectory, or to ROOT. DO NOT put a / after
the path name, MOVE adds it for you if needed. MOVE is
the recommended way to get a file from one place to
another quickly since the directory need not be reloaded
after the MOVE.
SEARCH --->
Searchs the marked group of files for the pattern found
in the E window. Upper/lower ARE different. If the \
character is found, the next two characters are converted
into a single Hexadecimal digit and used as one
character in the overall search. The search pattern was
limited to 60 max characters by choice. The search has
two modes, SLOW and FAST, which it will choose depending
on how much memory is available in the machine. I HIGHLY
recommend freeing up enough RAM to allow the FAST mode to
run since the SLOW mode is AT LEAST 10 times slower.
The SLOW mode search can be aborted by hitting the ESC
key. The FAST mode cannot be aborted, it is so fast you
will not mind the slight wait.
SHOWILBM --->
If you select this to be included, the program will try
to copy a SHOW command into the ram disk from SYS:C
and lock it (to save it frlom accidental deletion), then
will perform consecutive Execute's to show the selected
files. The show command that has been floating around
here needs you to click the upper left hand corner
after showing each file - so there is no loop to wait
for a picture to show. If SYS:C/SHOW does not exist,
DIRUTIL will continue but will not allow the SHOW gadget
to be clicked.
NEW NOTES: 6-Aug
Because of a problem with locking and unlocking the
current directory on a disk that had been removed,
I had to make a change to what the program defaulted
to (for a current directory).
Changes made:
- Initial current directory is ALWAYS set to RAM:
- if you really confuse it, it will go to RAM:
rather than SYS:
I forgots :
I neglected to mention a rather important feature.
If you did something stupid like select all files
and then hit delete, and suddenly realize that
you REALLY didnt want to do that, there is a
STOP IDIOT feature. When you are doing operations
on a group of files, CLICKING ANYWHERE IN THE
WINDOW WILL ABORT THE OPERATION.
This version incoorporates all the changes from previous hacks,
I call it DirUtil III since I was getting tired of saying
DirUtil II v1.7 or something long-winded like that. I have not
crashed it yet, but would appreciate knowing if all the functions
work with memory above 512K.
As soon as I get the new Aztec compiler, I will use the new features
in it to compact and enhance the code some more. Specifically,
Aztec has a function that will eliminate the need to load the
SYS:c/Run command whenever an Execute() call is made. Unfortunately,
this command is buggy under Aztec 3.20a.
This program is "HackerWare", a program that contains executable,
source, icon, and docs. PLEASE keep all the files intact if you
upload the ARC file to another BBS or Information Service and give
credit where credit is due, Chris, Dave, and myself have worked hard
on the parts of this program to make it a smooth, efficient tool
and I hope you enjoy using it!
One last thing, the simple make file in the ARC assumes that you
have an Aztec precompiled file called s/INT. If you don't, you
either 1> Have Aztec and are too stupid to use the precompiled
files to cut the compile time to ZIP. or 2> You are really
bonkers and use Lattice!
Here's a scenerio that results in a BIG bug that bit me squarely
in the butt after 4 hours of work!
rename duIII.c duIII.c/duIII.c
Yes, that means rename duIII.c to duIII.c in the subdirectory
called duIII.c. I know that that is not supposed to happen and
should fail, BUT, because of one time string concat. bug in Dirutil,
it did happen with TERRIBLE consequences. If the files involved were
in the RAM: disk, the ORIGINAL file is DELETED and the memory is
NOT deallocated, effectively crippling the machine and any work
you had done to that file. If the file was on a floppy, it still
deletes the file and does not tell the DOS to free up the space,
effectively locking out mucho space on your disk and having God
only knows what other consequences later on down the road. I
sure wish C-A would get it right in the future and I hope someone
with closer contacts to the "Gurus" will inform them of this
"oversight"!
For anyone interested, it takes the 68000 158+ cycles to do a
division and 70+ cycles to do a multiply. By changing all
the division and multiplication in a program to >> and <<
shifts, you can save 150 cycles per instruction! (assuming you are
dividing by a base 2 number). I did this to the quicksort loops
and it helps greatly.
Oh yeah, the great new icon is courtesy of Brian Gallivan.